package com.zyz.common.core.page;

import java.io.Serializable;
import java.util.List;

/**
 * Page分页数据
 *
 * @author zyz
 * @date 2021年2月26日
 */
public class Page<T> implements Serializable {

    private static final long serialVersionUID = -4738548757338165123L;

    private List<T> list;
    private int pageNum;
    private int pageSize;
    private long totalPage;
    private long totalRow;

    /**
     * 是否是最后一页
     */
    private boolean isIsLastPage;
    /**
     * 是否是第一页
     */
    private boolean isFirstPage;

    public boolean isIsLastPage() {
        return isIsLastPage;
    }

    public Page() {
    }

    public void setIsLastPage(boolean isLastPage) {
        isIsLastPage = isLastPage;
    }

    public boolean isFirstPage() {
        return isFirstPage;
    }

    public void setFirstPage(boolean firstPage) {
        isFirstPage = firstPage;
    }

    public List<T> getList() {
        return list;
    }

    public void setList(List<T> list) {
        this.list = list;
    }

    public int getPageNum() {
        return pageNum;
    }

    public void setPageNum(int pageNum) {
        this.pageNum = pageNum;
    }

    public int getPageSize() {
        return pageSize;
    }

    public void setPageSize(int pageSize) {
        this.pageSize = pageSize;
    }

    public long getTotalPage() {
        return totalPage;
    }

    public void setTotalPage(long totalPage) {
        this.totalPage = totalPage;
    }

    public long getTotalRow() {
        return totalRow;
    }

    public void setTotalRow(long totalRow) {
        this.totalRow = totalRow;
    }

    @Override
    public String toString() {
        return "Page [list=" + list + ", pageNum=" + pageNum + ", pageSize=" + pageSize + ", totalPage=" + totalPage
                + ", totalRow=" + totalRow + "]";
    }

}